<template>
	<view>
		<slot></slot>
		<view v-if='loading' class='fixed bg w100 h100vh left0 top0 flex j-c'>
			<u-loading mode="flower" size="80" class="absolute" style="top:30%" />
		</view>
	</view>
</template>

<script>
	export default {
		name: "sb-loading-full",
		data() {
			return {
				loading: false
			};
		},
		methods: {
			show() {
				this.loading = true
			},
			hide() {
				this.loading = false
			}
		},
	}
</script>

<style scoped lang="scss">
	.bg {
		background-color: #f5f5f5;
		z-index: 10000;
	}
</style>
